from django.db import models

# Create your models here.
from django.contrib.auth.models import AbstractUser

class User(AbstractUser):
# 手机号
  mobile = models.CharField(max_length=11, unique=True,blank=True)
# 头像信息
  avatar = models.ImageField(upload_to="avatar/%Y%m%d/",  blank=True)
# 简介信息
  user_desc = models.CharField(max_length=500, blank=True)

class Meta:
    db_table = 'tb_users'
    verbose_name = '用户管理'
    verbose_name_plural = verbose_name

def _str_(self):
    return self.username